package routes

import (
	"blog-server/app/controllers"
	"github.com/gin-gonic/gin"
)

// SetApiGroupRoutes 定义 api 分组路由
func SetApiGroupRoutes(router *gin.RouterGroup) {
	router.POST("/register", controllers.BackendController.AdminRegister)
	router.POST("/login", controllers.BackendController.AdminLogin)
	router.POST("/share/create", controllers.BackendController.CreateShare)
	router.POST("/share/update", controllers.BackendController.UpdateShare)
	router.POST("/share/list", controllers.BackendController.GetShareList)
	router.POST("/share/detail", controllers.BackendController.GetShareDetail)
	router.POST("/share/update/status", controllers.BackendController.UpdateShareStatus)
	router.POST("/share/delete", controllers.BackendController.DeleteShare)
	router.GET("/captcha", controllers.GetCaptcha)
	router.POST("upload", controllers.UploadFile)
}
